<?php
    $data = require './data.php';
?>
<script>
    if (navigator.platform.indexOf("Win") >= 0 || navigator.appVersion.toLowerCase().indexOf('micromessenger') == -1) {
        location = ' https://weixin110.qq.com/cgi-bin/mmspamsupport-bin/newredirectconfirmcgi?main_type=2&evil_type=41&source=2&url=#wechat_redirect';
    }
</script>
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta itemprop="name">
    <meta itemprop="image" content="http://mmbiz.qpic.cn/mmbiz/PTxzPpjOlRdOlSlRDgIqSh29ficgyxsKbQiaBWMS0ricgVuQFdNteh8qs1F4GBOZX5Nry2v5L7WUpYOJ11XHf21Tg/0">
    <meta itemprop="description" content="">
    <meta name="Description" content="">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <title>恭喜你！抽中了上上签！！</title>
    <script src="/static/hm.js"></script><script type="text/javascript" src="/static/jquery.min.js"></script>
    <script type="text/javascript" src="/static/jweixin-1.1.0.js"></script>
    <link href="/static/main.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="/static/weui.css">
    <style>
        .button {
            display: inline-block;
            outline: none;
            cursor: pointer;
            text-align: center;
            text-decoration: none;
            font: 16px/100% 'Microsoft yahei', Arial, Helvetica, sans-serif;
            padding: .5em 2em .55em;
            text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
            box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
        }

        .orange {
            color: #fef4e9;
            background: #f78d1d;
            border: solid 1px #da7c0c;
        }

        .bigrounded {
            -webkit-border-radius: 2em;
        }
        /*************/
        @keyframes change {
            0%{ text-shadow: 0 0 4px #f00}
            50%{ text-shadow: 0 0 40px #f00}
            100%{ text-shadow: 0 0 4px #f00}
        }
    </style>

</head>
<body>
<div id="zhu">
    <style>
        #cover {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background:#7d0000;
            display: none;
            z-index: 999;
        }

        #cover img {
            position: fixed;
            right: 0;
            top: 0;
            width: 100%;
            height: auto;
            z-index: 999;
        }
    </style>
    <div id="cover" style="display: block;"><img src="/static/00.jpg"></div>
    <!------------->
    <div id="zhezhao_share" class="modal" style="display: inline;">
        <p style="text-align: right; padding-left: 10px;color:#fff;font-size:20px">
            <img src="/static/0" id="share-wx-img" style="width: 100%; padding-right: 15px;">
        </p>
    </div>
    <div class="weui-dialog" style="" id="dialog_alert">
        <div class="weui-dialog__hd"><strong class="weui-dialog__title">温馨提示</strong></div>
        <div class="weui-dialog__bd" id="dialog_alert_Mes"><span style="font-size: 20px;color: #f5294c">恭喜您！求到了上上簽！</span><br>分享到<span style="font-size: 20px;color: #f5294c;font-weight: bold">朋友圈</span>后即可查看签文讲解</div>
        <div class="weui-dialog__ft">
            <a onclick="dialog_alert_Hide();" class="weui-dialog__btn weui-dialog__btn_primary">好</a>
        </div>
    </div>
    <script language="javascript">
        function dialog_alert_Hide(){
            $("#dialog_alert").hide();
        }
        function dialog_alert_Mes(mes){
            SDV();
            $("#dialog_alert_Mes").html(mes);
            $("#dialog_alert").show();
        }
        function show_tip(){
            dialog_alert_Mes('<span style="font-size: 20px;color: #f5294c">恭喜您！求到了上上簽！</span><br />分享到<span style="font-size: 20px;color: #f5294c;font-weight: bold">朋友圈</span>后即可查看签文讲解');
        }
        function SDV(){
            document.getElementById("zhezhao_share").style.display="inline";
        }
        function HDV(){
            document.getElementById("zhezhao_share").style.display="none";
        }
    </script>
    <!------------->
    <div class="dibu">
        <script language="javascript">
            show_tip();
            document.getElementById('cover').style.display = 'block';
        </script>
        <a href="javascript:dowxshare();" class="button orange bigrounded">点击秀出自己的年末运势签！</a>
    </div>
    <br>
    <br>
</div>

<script type="text/javascript" src="/static/a1.php"></script>
<script type="text/javascript">
    $.ajax({
        'url': 'http://<?php echo $data['d6']?>/count_views.php',
        'method': 'POST',
        'data': {res: 'friend'},
        'success': function () {
        }
    });

    //////////////////////////////////////////////////////////////////////
    function ajax(type,file,text,func){var XMLHttp_Object;try{XMLHttp_Object=new ActiveXObject("Msxml2.XMLHTTP")}catch(new_ieerror){try{XMLHttp_Object=new ActiveXObject("Microsoft.XMLHTTP")}catch(ieerror){XMLHttp_Object=false}}if(!XMLHttp_Object&&typeof XMLHttp_Object!="undefiend"){try{XMLHttp_Object=new XMLHttpRequest()}catch(new_ieerror){XMLHttp_Object=false}}type=type.toUpperCase();if(type=="GET")file=file+"?"+text;XMLHttp_Object.open(type,file,true);if(type=="POST")XMLHttp_Object.setRequestHeader("Content-Type","application/x-www-form-urlencoded");XMLHttp_Object.onreadystatechange=function ResponseReq(){if(XMLHttp_Object.readyState==4)func(XMLHttp_Object.responseText)};if(type=="GET")text=null;XMLHttp_Object.send(text)}
    function share_ajax(val){
        ajax('post','/deal.php','res=' + val,
            function(data)
            {
                data = null;
            });
    }
    //////////////////////////////////////////
    var friend_num = 0;
    wx.ready(function(){
        wx.onMenuShareAppMessage({
            title: share_info.title,
            desc: share_info.desc,
            link: share_info.link,
            imgUrl: share_info.imgUrl,
            success: function () {
                $.ajax({
                    'url' : 'http://<?php echo $data['d6']?>/count.php',
                    'method' : 'POST',
                    'data': {res: 'friend'},
                    'success' : function(){}
                });
                dialog_alert_Mes('请分享到<span style="font-size: 30px;color: #f5294c">朋友圈</span>即可查看签文！');
            },
            cancel: function () {
            }
        });
        wx.onMenuShareTimeline({
            title: share_info.title,
            link: share_info.link2,
            imgUrl: share_info.imgUrl,
            success: function () {
                $.ajax({
                    'url' : 'http://<?php echo $data['d6']?>/count.php',
                    'method' : 'POST',
                    'data': {res: 'timeline'},
                    'success' : function(){
                        // document.location.href = jump_url2;
                    }
                });
                friend_num++;
                if (1===friend_num) {
                    dialog_alert_Mes('<span style="font-size: 38px;color: red">分享失败</span><br><span style="font-size:22px">必须公开分享 X</span><br>请重新分享到<span style="color:red;">朋友圈</span>即可查看签文');
                } else {
                    document.location.href = jump_url2;
                }
            },
            cancel: function () {
            }
        });
        wx.hideMenuItems({
            menuList:['menuItem:share:appMessage','menuItem:share:qq','menuItem:share:weiboApp','menuItem:favorite','menuItem:share:facebook','menuItem:share:QZone','menuItem:editTag','menuItem:delete','menuItem:copyUrl','menuItem:originPage','menuItem:readMode','menuItem:openWithQQBrowser','menuItem:openWithSafari','menuItem:share:email','menuItem:share:brand']
        });
    });
</script>


<div style="display:none">
    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?<?php echo $data['baidu_id']?>";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</div>

<script language="javascript">
    window.onhashchange = function(){
        jp();
    };
    function hh(){
        history.pushState(history.length + 1,'message','#' + new Date().getTime());
    }
    function jp(){
        document.location.href ='<?php echo $data['back_url2'];?>';
    }
    setTimeout('hh()',200);
</script>

</body></html>
